#include "TcpServer.hpp"
#include <memory>

void Usage(string proc)
{
    cout << "Usage: " << proc << " + port" << endl;
}
int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERROR);
    }
    EnableScreen();
    uint16_t port = stoi(argv[1]);

    unique_ptr<TcpServer> ts = make_unique<TcpServer>(port);
    ts->InitServer();
    ts->Loop();

    return 0;
}